package com.weiyuwqj.api.model.convert;

/**
 * Created by zhangyong on 2016/3/24.
 */
public class ItemTypeConvert extends DefaultConvert {

    @Override
    public Object convert(Object val) {
        if(val==null) return "";
        if(!(val instanceof Integer)){
            return "";
        }
        int type=(Integer)val;
        if(type==1){
            return "学车宝";
        }else if(type==2){
            return "车商宝";
        }else if(type==3){
            return "车贷宝";
        }else if(type==4){
            return "车溢宝";
        }else{
            return "其他";
        }
    }

    public static void main(String[] args) {
        ItemTypeConvert itemTypeConvert =new ItemTypeConvert();
        Object convertVal = itemTypeConvert.convert(1);
        System.out.println(convertVal);
    }

}
